

import request from "../request";
//获取地址列表
export const getAdreslist = () => {
    return request.get('/lejuClient/address/findAllAddress')
}
//获取地址列表
export const delAdreslist = (addressId: string | null) => {
    return request.delete(`/lejuClient/address/delAddressInfo/${addressId}`)
}
//添加地址
export const addAdreslist = (data: {}) => {
    return request.post('/lejuClient/address/addAddressInfo', data)
}

//更新地址
export const updataAdreslist = (data: {}) => {
    return request.post('/lejuClient/address/updateAddressInfo', data)
}

//更新默认项
export const updatadefault = (addressId: any, defaultStatus: any) => {
    return request.post(`/lejuClient/address/switchDefault/${addressId}/${defaultStatus}`)
}  